package Text;

import java.util.Arrays;
import java.util.Scanner;

public class Num {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("输入五个数:");
        int []a=new int[5];
        for(int i=0;i<5;i++){
            int b=sc.nextInt();
            a[i]=b;
        }
        //倒序
        for(int i=4;i>=0;i--){
            System.out.print(a[i]+" ");
        }
        System.out.println();
        //排序
        Arrays.sort(a);
        for(int i=0;i<5;i++){
            System.out.print(a[i]+" ");
        }
    }
}
